package com.madou.yy.football.obstacle;

import com.madou.yy.football.BackgroundPanel;
import com.madou.yy.football.ResourcesUtil;

import javax.swing.*;
import java.awt.*;

public class Shitou extends JLabel implements Obstacle {
    BackgroundPanel backgroundPanel;
    public Shitou(BackgroundPanel backgroundPanel){
        this.backgroundPanel = backgroundPanel;
        this.setBounds(backgroundPanel.getWidth()/2+50,100,316,100);//设置图片放置的位置
        this.setPreferredSize(new Dimension(316,100));
        this.setIcon(new ImageIcon(ResourcesUtil.getRootPath()+"\\ball\\st.png"));
    }

    @Override
    public String name() {
        return "石头";
    }

    @Override
    public JComponent getComponent() {
        return this;
    }

    public void start(){
    }

    public void stop(){
    }

}
